﻿using System.Data.Entity.ModelConfiguration;
using RealtReview.DataAccess.Entities.IdentityProvider;

namespace RealtReview.DataAccess.Mappings
{
    public class AspNetUsersMap : EntityTypeConfiguration<AspNetUsers>
    {
        public AspNetUsersMap()
        {
            HasMany(e => e.AspNetUserClaims)
               .WithRequired(e => e.AspNetUsers)
               .HasForeignKey(e => e.UserId);

            HasMany(e => e.AspNetUserLogins)
            .WithRequired(e => e.AspNetUsers)
            .HasForeignKey(e => e.UserId);
        }
    }
}